//config.hが存在するなら読み込む
#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#if HAVE_STDIO_H
#  include <stdio.h>
#else
int printf (const char *format, ...);
#endif

#if HAVE_STRING_H
#  include <string.h>
#else
#  ifndef HAVE_STRRCHR
#    define strrchr rindex
#  endif
char *strrchr ();
#endif

int main (int   argc, char *argv[]){
  char *p, *program_name;

  p = strrchr (argv[0], '/');
  if (p == NULL) program_name = argv[0];
  else program_name = p+1;

  printf ("program_name: %s \n", program_name);

  return 0;
}